package com.example.demo.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Auther: Admin
 * @Date: 2021/3/3 17:33
 * @Description:
 */
@Configuration(proxyBeanMethods = false)// 默认为true从容器中获取，否则每次new对象不一样
public class ConfigurationBean {


    @Bean("user1")
    public User user01() {

        return new User("zbk", 35);

    }

}
